package com.example.demo.mapper;

import com.example.demo.entity.OrderDetail;
import com.example.demo.entity.Orders;
import com.example.demo.entity.OrdersCustom;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface OrdersCustomMapper {
    /**
     * 查询订单，关联查询用户信息
     * 一对一
     * */
    List<OrdersCustom> findOrdersUser();

    /**
     * 一对一查询
     * @return
     */
    List<Orders> findOrdersUserResultMap();

    /**
     * 一对多查询
     * @return
     */
    List<OrderDetail> findOrdersAndOrderDetailResultMap();
}
